<!DOCTYPE html>
<html>
	<head>
		<title>Cinder on Jetson TK1</title>

		<!-- keywords used for searching -->
		<meta name="keywords" content="guide, linux, jetson, tk1">
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<!-- reference to Cinder classes -->
   		<!-- <ci seealso dox="[CLASS NAME GOES HERE]" label="[NAME OF LINK]"></ci> -->

   		<!-- master stylesheet - these links will be replaced when compiled -->
		<link rel="stylesheet" href="../../_assets/css/foundation.css">
		<link rel="stylesheet" href="../../_assets/css/prism.css">
		<link rel="stylesheet" href="../../_assets/css/style.css">
		<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>

		<!-- Place additional stylsheet links here, which will be copied over when compiled (optional) -->
		
	</head>

	<body id="guide-contents" class="language-c++">

		<!-- CONTENT STARTS HERE -->

		<h1>Jetson TK1 Notes</h1>
		<h3 id="cmake">Requirements</h3>
		<ul>
			<li>CMake 3.0+</li>
		</ul>
		<h4 id="cmake">CMake</h4>
		<p>Unfortunately the version of CMake packaged for Linux For Tegra (L4T) R21.5 is too old to build Cinder, so a newer one must be compiled from source. Perform the following from a temporary directory:</p>
<pre><code>sudo apt-get install g++
wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz
tar xvf cmake-cmake-3.7.2.tar.gz
cd cmake-3.7.2
./configure --prefix=/opt/local
make -j 4
sudo make install
</code></pre>
		
		<h3 id="library-dependencies">Cinder Dependencies</h3>
<pre><code>sudo apt-get install libxcursor-dev \
libxrandr-dev \
libxinerama-dev \
libxi-dev \
libgl1-mesa-dev \
libgles2-mesa-dev \
zlib1g-dev \
libfontconfig1-dev \
libsndfile1 \
libsndfile1-dev \
libpulse-dev \
libasound2-dev \
libcurl4-gnutls-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-libav \
gstreamer1.0-alsa \
gstreamer1.0-pulseaudio \
libboost-filesystem-dev
</code></pre>

<p><strong>libmpg123-dev</strong> - L4T R21.5 does not have the package <code>libmpg123-dev</code>. The contents of the package must be built and installed locally. Perform the following from a temporary directory:</p>
<pre><code>
wget https://www.mpg123.de/download/mpg123-1.24.0.tar.bz2
tar xvf mpg123-1.24.0.tar.bz2
cd mpg123-1.24.0
./configure --prefix=/opt/local
make -j 4
sudo make install
</code></pre>
<p>The example above uses <code>/opt/local</code> because the <code>find_package</code> scripts for CMake are set to look there for custom libraries.

		<h1 id="building-cinder">Building Cinder</h1>
		<h3 id="fetching-and-building-cinder">Fetching and Building Cinder</h3>
<pre><code>git clone --recursive https://github.com/cinder/Cinder.git
cd Cinder
mkdir build &amp;&amp; cd build
cmake ..
make -j 4
</code></pre>

		<h1 id="building-and-running-basicapp">Building and Running BasicApp</h1>
		<h3 id="building">Building</h3>
<pre><code>cd samples/BasicApp/proj/cmake
mkdir build &amp;&amp; cd build
cmake ..
make</code></pre>

		<h3 id="running">Running</h3>
		<p>Starting from <code>samples/BasicApp/proj/cmake/build</code>:</p>
		<pre><code>./Debug/BasicApp/BasicApp</code></pre>

		<!-- END CONTENT -->

		<!-- Scripts -->
		<script src="../../_assets/js/prism.js" type="text/javascript"></script>
		<!-- Place additional scripts here (optional) -->
		<!-- <script type="text/javascript"></script> -->

	</body>
</html>
